#include <bits/stdc++.h>
using namespace std;

#include <bits/extc++.h>
using namespace __gnu_pbds;

using Real = long double;
using llt = long long;
using vi  =vector<int>;
using pii = pair<int, int>;
using vvi = vector<vi>;
using vpii = vector<pii>;

string S;
void proc(){
    vector<string> vec;
    for(int i=1;i<S.length();++i){
        vec.emplace_back(S.substr(i - 1, 2));
    }
    sort(vec.begin(), vec.end());
    for(const auto & s : vec) cout << s << "\n";
}

int main(){
#ifndef ONLINE_JUDGE
    freopen("z.txt", "r", stdin);
#endif
    ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(0);
    int nofkase = 1;
    // cin >> nofkase;
    while(nofkase--){
        cin >> S;
        proc();  
    }
    return 0;
}